SHELL = @SHELL@


# THESE VARIABLES MAY CHANGE BETWEEN PACKAGES

# Set 'package' to the name of your package.
package := @CLICKPACKAGENAME@

# Set these variables appropriately.
top_builddir := .
subdir := .

# Require Click prefix settings.
# Generally, you will provide a '--with-click=CLICKPREFIX' option, and set:
include @clickdatadir@/config.mk
include @clickdatadir@/pkg-config.mk

srcdir = @srcdir@
top_srcdir = @top_srcdir@
AUTOCONF = $(CLICKAUTOCONF)
ACLOCAL = :

TARGETS = package

all: Makefile $(TARGETS)

package: Makefile
	@cd package && $(MAKE) all

elemlist: Makefile
	@cd package && $(MAKE) elemlist

install: Makefile
	@for d in $(TARGETS); do (cd $$d && $(MAKE) install) || exit 1; done

install-man:
	@cd package && $(MAKE) install-man

$(srcdir)/configure: $(srcdir)/configure.ac
	cd $(srcdir) && $(ACLOCAL) && $(AUTOCONF)
config.status: $(srcdir)/configure
	$(SHELL) $(srcdir)/configure @ac_configure_args@
Makefile: config.status $(srcdir)/Makefile.in
	cd $(top_builddir) && \
	  CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status

clean:
	@-for d in $(TARGETS); do (cd $$d && $(MAKE) clean); done

distclean:
	@-for d in $(TARGETS); do (cd $$d && $(MAKE) distclean); done
	-rm -f Makefile config.status config.cache config.log config.h

.PHONY: all package elemlist clean distclean \
	install install-doc install-man install-include
